package algorithm.sort.child;

/**
 * 休眠排序
 */
public class SleepSort extends Thread {
    public int value;

    public SleepSort(int value) {
        this.value = value;
    }

    public void run() {
        try {
            Thread.sleep(value);
            System.out.println(value);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        int[] array = {10, 100, 50, 30, 60, 61, 64};
		for (int item : array) {
			new SleepSort(item).start();
		}
    }
}
